package com.cz.storage.controller;

import com.cz.storage.service.IStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>库存控制器</p>
 * <pre>
 * @author gitamacai
 * @date 2019/12/9 9:54
 * </pre>
 */
@RestController
@RequestMapping("/storage")
public class StorageController {
    @Autowired
    private IStorageService storageService;

    @RequestMapping(value = "/deduct", produces = "application/json")
    public void deduct(String commodityCode, Integer count) {
        storageService.deduct(commodityCode, count);
    }
}
